<!--
 * @Author: zjj
 * @Date: 2019-11-26 13:22:55
 * @LastEditors: zjj
 * @LastEditTime: 2019-11-26 13:49:04
 -->
<!--  -->
<template>
  <div class="mask" @click="$emit('closeAds')" v-if="loginRewardFlag">
    <div class="content" @click.stop>
      <div class="title">0元抢购活动火热进行中</div>
      <div class="tip">每日登录</div>
      <div class="reward">+{{count}}</div>
      <div class="content-reward">获得0元购参与次数</div>
      <div class="from">“首页-0元抢购”参与活动</div>
      <div class="close" @click="$emit('closeAds')">我知道了</div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    loginRewardFlag: {
      type: Boolean,
      default: () => {
        return false
      }
    },
    count:{
      type:[String,Number],
      default:()=>{
        return 0
      }
    }
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  methods: {},
  created() {},
  mounted() {},
  updated() {}, //生命周期 - 更新之后
  destroyed() {} //生命周期 - 销毁完成
}
</script>
<style lang='less' scoped>
//@import url(); 引入公共css类
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
  &::before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    height: 100%;
  }
}
.content {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  z-index: 998;
  width: 274px;
  height: 353px;
  border-radius: 10px;
  background: url('../assets/imgs/login-reward.png');
  background-size: 100% 100%;
  animation: show 0.3s 1;
  box-shadow: 14px 25px 16px 7px rgba(0, 0, 0, 0.05);
  @keyframes show {
    0% {
      opacity: 0;
      transform: scale(1.5);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
  .title {
    padding-top: 18px;
    text-align: center;
    font-size: 18px;
  }
}
.title {
  padding-top: 29px;
  font-size: 15px;
  text-align: center;
  color: #a96745;
}
.tip {
  margin-top: 44px;
  font-size: 12px;
  text-align: center;
  color: #FEF3ED;
}
.reward {
  margin-top: 40px;
  font-size: 37px;
  color: #fff;
  text-align: center;
}
.content-reward {
  margin-top: 29px;
  font-size: 12px;
  color: #fef3ed;
  text-align: center;
}
.from {
  margin-top: 48px;
  color: #a96745;
  font-size: 12px;
  text-align: center;
}
.close {
  margin: 16px auto 0;
  width: 200px;
  height: 35px;
  background: rgba(255, 52, 34, 1);
  border-radius: 18px;
  font-size: 18px;
  color: #fff;
  line-height: 35px;
  text-align: center;
}
</style>